bitkeeper revision 1.69 (3e53c54cEL529pxHNKFYKzvzVGQhXw)
authorkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Wed, 19 Feb 2003 17:56:28 +0000 (17:56 +0000)
committerkaf24@labyrinth.cl.cam.ac.uk <kaf24@labyrinth.cl.cam.ac.uk>
Wed, 19 Feb 2003 17:56:28 +0000 (17:56 +0000)
schedule.c:
  Fix so we don't schedule idle domain unnecessarily.

xen-2.4.16/common/schedule.c

index d3ef9a88fc913fbc56176ce8b065df04179eef61..787b43d900b38b07b362d06ad4cec5d288a45dd7 100644 (file)
@@ -26,6 +26,7 @@
 #include <xeno/event.h>
 #include <xeno/time.h>
 #include <xeno/ac_timer.h>
+#include <xeno/interrupt.h>
 
 #undef SCHEDULER_TRACE
 #ifdef SCHEDULER_TRACE
@@ -224,7 +225,7 @@ asmlinkage void schedule(void)
 
     spin_lock_irq(&schedule_data[this_cpu].lock);
 
-    /*ASSERT(!in_interrupt());*/
+    ASSERT(!in_interrupt());
     ASSERT(__task_on_runqueue(prev));
 
        __move_last_runqueue(prev);
@@ -247,7 +248,7 @@ asmlinkage void schedule(void)
     list_for_each(tmp, &schedule_data[smp_processor_id()].runqueue) {
         p = list_entry(tmp, struct task_struct, run_list);
         next = p;
-        break;
+        if ( !is_idle_task(next) ) break;
     }
 
     prev->has_cpu = 0;